<!--
  Generated template for the LoginPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-content>
  <div class="left-back" *ngIf="!first_page">
    <br showWhen="ios">
    <button ion-button icon-only clear color="gm-primary" (click)="onBack()">
      <ion-icon name="arrow-back"></ion-icon>
    </button>
  </div>

  <div class="login-container">
    <img width="100" src="assets/icon/login-logo.png" (press)="onEnvSwitch()"/>

    <div class="input-frame">
      <div class="input-layout">
        <ion-icon name="call" color="gm-primary"></ion-icon>
        <ion-input type="tel" [(ngModel)]="login.phone" placeholder="手机号"></ion-input>
      </div>

      <div class="input-layout" margin-top>
        <ion-icon name="lock" color="gm-primary"></ion-icon>
        <ion-input type="password" [(ngModel)]="login.password" placeholder="密码"></ion-input>
      </div>

      <div class="hor-layout" margin-top>
        <div (click)="onRegisterSubmit()" tappable><u>用户注册</u></div>
        <div (click)="onPasswordSubmit()" tappable><u>忘记密码</u></div>
      </div>
    </div>

    <button ion-button full color="gm-primary" icon-right margin-bottom (click)="onLoginSubmit()">
      登录
      <ion-icon name="log-in"></ion-icon>
    </button>

    <button ion-button outline small color="gm-primary" margin-top (click)="onGuestLogin()" *ngIf="first_page">游客登录</button>
  </div>
</ion-content>
